package com.chixing.Homework;

public class School implements Cloneable{
    private Student student;
    private String scName;

    public School(){

    }

    public School(Student student, String scName) {
        this.student = student;
        this.scName = scName;
    }

    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    public String getScName() {
        return scName;
    }

    public void setScName(String scName) {
        this.scName = scName;
    }

    @Override
    public String toString() {
        return "School{" +
                "student=" + student +
                ", scName='" + scName + '\'' +
                '}';
    }

    @Override
    protected java.lang.Object clone() throws CloneNotSupportedException {
        School scclone =new School();
        scclone.scName=this.scName;
        scclone.student= (Student) student.clone();

        return scclone;
    }
}
